package com.wgb.movie.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wgb.movie.model.dto.movieShow.MovieShowQueryRequest;
import com.wgb.movie.model.entity.MovieShow;
import com.wgb.movie.model.vo.MovieShowVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 上映服务
 *
 * @author <a href="https://github.com/liyupi">程序员鱼皮</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface MovieShowService extends IService<MovieShow> {

    /**
     * 校验数据
     *
     * @param movieShow
     * @param add 对创建的数据进行校验
     */
    void validMovieShow(MovieShow movieShow, boolean add);

    /**
     * 获取查询条件
     *
     * @param movieShowQueryRequest
     * @return
     */
    QueryWrapper<MovieShow> getQueryWrapper(MovieShowQueryRequest movieShowQueryRequest);
    
    /**
     * 获取上映封装
     *
     * @param movieShow
     * @param request
     * @return
     */
    MovieShowVO getMovieShowVO(MovieShow movieShow, HttpServletRequest request);

    /**
     * 分页获取上映封装
     *
     * @param movieShowPage
     * @param request
     * @return
     */
    Page<MovieShowVO> getMovieShowVOPage(Page<MovieShow> movieShowPage, HttpServletRequest request);
}
